<mat-toolbar>
<mat-toolbar-row>
  <div>
    <label class="bed-bc" (click)="backTo('building')">{{"bedMgt" | translate}}</label>
  </div>
  <div *ngIf="geLevel()">
    <label>&gt;</label>
    <label class="bed-bc" (click)="backTo('level')">{{building['buildingName']}}</label>
  </div>
  <div *ngIf="geRoom()">
    <label>&gt;</label>
    <label class="bed-bc" (click)="backTo('room')">{{level['levelName']}}</label>
  </div>
  <div *ngIf="geBed()">
    <label>&gt;</label>
    <label class="bed-bc">{{room['roomName']}}</label>
  </div>

  <span class="header-spacer"></span>

  <div class="btn-group">
    <button type="button" class="btn btn-light" (click)="add()" *ngIf="isUserQualified()">
      <mat-icon svgIcon="add" style="color: green;"></mat-icon>
      {{"add" + type | translate}}
    </button>
  </div>
</mat-toolbar-row>
</mat-toolbar>

<div class="bed-grid-list">
  <mat-grid-list *ngIf="isBuilding()" cols="{{colNumber}}" rowHeight="150px">
    <mat-grid-tile *ngFor="let building of buildings">
      <app-bobject [item]="building" [type]="type" (refresh)="refresh()" (goto)="goto($event)" (change)="modify($event)"></app-bobject>
    </mat-grid-tile>
  </mat-grid-list>

  <mat-grid-list *ngIf="isLevel()" cols="{{colNumber}}" rowHeight="150px">
    <mat-grid-tile *ngFor="let level of levels">
      <app-bobject [item]="level" [type]="type" (refresh)="refresh()" (goto)="goto($event)" (change)="modify($event)"></app-bobject>
    </mat-grid-tile>
  </mat-grid-list>

  <mat-grid-list *ngIf="isRoom()" cols="{{colNumber}}" rowHeight="150px">
    <mat-grid-tile *ngFor="let room of rooms">
      <app-bobject [item]="room" [type]="type" (refresh)="refresh()" (goto)="goto($event)" (change)="modify($event)"></app-bobject>
    </mat-grid-tile>
  </mat-grid-list>

  <mat-grid-list *ngIf="isBed()" cols="{{colNumber}}" rowHeight="150px">
    <mat-grid-tile *ngFor="let bed of beds">
      <app-bobject [item]="bed" [type]="type" (refresh)="refresh()" (change)="modify($event)"></app-bobject>
    </mat-grid-tile>
  </mat-grid-list>
</div>